package com.uduemc.biso.core.feign;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import com.uduemc.biso.core.extities.center.SysRole;
import com.uduemc.biso.core.feign.fallback.SysRoleFeignFallback;
import com.uduemc.biso.core.utils.RestResult;

@FeignClient(value = "BISO-BASIC-SERVICE", fallbackFactory = SysRoleFeignFallback.class)
@RequestMapping("/sys-role")
public interface SysRoleFeign {

	@PostMapping("/insert")
	public RestResult insert(@RequestBody SysRole sysRole);

	@PostMapping("/insert-selective")
	public RestResult insertSelective(@RequestBody SysRole sysRole);

	@PutMapping("/update-by-id")
	public RestResult updateById(@RequestBody SysRole sysRole);

	@PutMapping("/update-by-id-selective")
	public RestResult updateByIdSelective(@RequestBody SysRole sysRole);

	@GetMapping("/find-one/{id}")
	public RestResult findOne(@PathVariable("id") long id);

	@GetMapping(value = { "/find-all" })
	public RestResult findAll();

	@GetMapping("/delete-by-id/{id}")
	public RestResult deleteById(@PathVariable("id") long id);
}
